package com.bleeth.fx.component;

import javafx.geometry.Pos;
import javafx.scene.layout.HBox;
import lombok.Builder;


/**
 * @author Sakura
 * @version 1.0
 * @date 2021-11-13 22:17
 **/
@Builder
public class MPageHeader {

    @Builder.Default
    private int pageSize = 10;

    private int totalSize;

    //当前位置
    private int currentIndex;

    public HBox make() {
        int totalPageCount = 0;

        HBox box = new HBox();
        box.setSpacing(5);
        box.setPrefWidth(500D);
        box.setPrefHeight(50D);
        box.setAlignment(Pos.CENTER);

        int pageCount = totalSize / pageSize;
        if (totalSize % pageSize != 0) {
            totalPageCount = pageCount + 1;
        }

        for (int i = 0; i < totalPageCount; i++) {

        }

        return box;
    }

}
